import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import pinia,{useRouteStore} from "./piniaStore/index"
import router from "./router"


import getRoutes from './grants/router'
const app = createApp(App)

app.use(pinia)

const routeStore = useRouteStore()
//pinia:做动态添加路由配置
if(sessionStorage.getItem("grants")){
    getRoutes()
    routeStore.setIsAddRoute(true)
}

app.use(router)

app.mount('#app')
